# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-bottle
_pkgname=bottle
pkgver=0.12.19
pkgrel=3
pkgdesc='Fast and simple WSGI-framework for small web-applications.'
url='https://pypi.org/project/bottle/#files'
arch=('any')
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('e5d2f6a32d1b89ae3cc9607456c0614db2b58882c6d36273d695c51d3d77b1858cac4d914dbf19bca3b74be68c197aa6473f162e40d9b7ae2af3a084a28c2637')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/$_pkgname.py" "$pkgdir/usr/bin/${_pkgname}.py2"
}

